<%- include ../public/page_head.html %>
<div class="container-fluid">
            <div class="panel panel-default">
                    <div class="panel-heading">
                        轮播图列表
                    </div>
                    <div class="panel-body">
            <!--
                列表展示
            -->
                    <div class="table-responsive">
                        <table class="table table-bordered">
                            <thead>
                            <tr class="th">
                                <th>名称</th>
                                <th>分类</th>
                                <th>图片</th>
                                <th>跳转地址</th>
                                <th>顺序</th>
                                <th class="text-center">状态</th>
                                <th class="text-center">操作</th>
                            </tr>
                            </thead>
                            <tbody>
                            <%for(var i=0;i<list.length;i++){%>
                            <tr>
                                <td><%=list[i].title%></td>
                                <td><%if(list[i].type==1){%>
                                    网站
                                    <%}else if(list[i].type==2){%>
                                    APP <%}else if(list[i].type==3){%>
                                    小程序
                                    <%}else {%>
                                    未知类型
                                    <%}%>
                                </td>
                                <td><img src="<%=list[i].focus_img%>" style="width: 120px"></td>
                                <td><%=list[i].link%></td>
                                <td><span onclick="app.editNum(this,'Focus','sort','<%=list[i]._id%>')"><%=list[i].sort %></span></td>
                                <td  class="text-center">
                                    <%if(list[i].status==1){%>
                                    <img src="/public/admin/images/yes.gif" onclick="app.changeStatus(this,'Focus','status','<%=list[i]._id%>')" />
                                    <%}else{%>
                                    <img src="/public/admin/images/no.gif"  onclick="app.changeStatus(this,'Focus','status','<%=list[i]._id%>')" />
                                    <%}%>
                                </td>
                                <td class="text-center"><a class="btn btn-success" href="/admin/focus/edit?_id=<%=list[i]._id%>">修改</a>
                                    <a class="btn btn-danger"   href="/admin/delete?data=Focus&_id=<%=list[i]._id%>">删除</a>
                                </td>
                            </tr>
                            <%}%>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
</body>
</html>
